import { Device } from './entity/device.entity';

const cacheData = {
  'HUAWEI Mate 40 Pro NOH-AN00': {
    link_type: 'hdc',
    brand: 'HUAWEI',
    device_name: 'HUAWEI Mate 40 Pro',
    device_type: 'NOH-AN00',
    cpu_type: 'baltimore',
    cpu_arch: 'arm64-v8a',
    cpu_core_num: 8,
    cpu_cluster_num: 3,
    cpu_cluster_name: ['policy0', 'policy1', 'policy2'],
    cpu_cluster_cores: [[0, 1, 2, 3], [4, 5, 6], [7]],
    cpu_cluster_max_freq: [2045000, 2544000, 3130000],
    cpu_cluster_min_freq: [884000, 826000, 1402000],
    gpu_type: '',
    gpu_max_freq: 759000000,
    gpu_min_freq: 260000000,
    gl_version: '',
    vulkan_version: '',
    resolution: '',
    all_info_ready: true,
  },
  'HUAWEI Mate 60 Pro ALN-AL00': {
    link_type: 'hdc',
    brand: 'HUAWEI',
    device_name: 'HUAWEI Mate 60 Pro',
    device_type: 'ALN-AL00',
    cpu_type: 'baltimore',
    cpu_arch: 'arm64-v8a',
    cpu_core_num: 12,
    cpu_cluster_num: 3,
    cpu_cluster_name: ['policy0', 'policy1', 'policy2'],
    cpu_cluster_cores: [
      [0, 1, 2, 3],
      [10, 11],
      [4, 5, 6, 7, 8, 9],
    ],
    cpu_cluster_max_freq: [1530000, 2620000, 2150000],
    cpu_cluster_min_freq: [418000, 418000, 1239000],
    gpu_type: '',
    gpu_max_freq: 750000000,
    gpu_min_freq: 279000000,
    gl_version: '',
    vulkan_version: '',
    resolution: '',
    all_info_ready: true,
  },
  'HUAWEI Mate 60 Pro ALN-AL80': {
    link_type: 'hdc',
    brand: 'HUAWEI',
    device_name: 'HUAWEI Mate 60 Pro',
    device_type: 'ALN-AL80',
    cpu_type: 'baltimore',
    cpu_arch: 'arm64-v8a',
    cpu_core_num: 12,
    cpu_cluster_num: 3,
    cpu_cluster_name: ['policy0', 'policy1', 'policy2'],
    cpu_cluster_cores: [
      [0, 1, 2, 3],
      [10, 11],
      [4, 5, 6, 7, 8, 9],
    ],
    cpu_cluster_max_freq: [1530000, 2150000, 2620000],
    cpu_cluster_min_freq: [418000, 418000, 1239000],
    gpu_type: '',
    gpu_max_freq: 750000000,
    gpu_min_freq: 279000000,
    gl_version: '',
    vulkan_version: '',
    resolution: '',
    all_info_ready: true,
  },
};

export const getCache = (deviceName: string, deviceType: string): Device => {
  return cacheData[`${deviceName} ${deviceType}`] || {};
};

export const updateCache = () => {};
